package com.zx.idc.backend.gui.scheduler.report.securelog;

import com.zx.idc.common.spring.SpringBeanUtil;
import com.zx.idc.ds.report.rsecurelog.service.IRSecureLogMonService;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 统计安全日志月报Job
 */
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class RSecureLogMonJob implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(RSecureLogMonJob.class);

    @Autowired
    private IRSecureLogMonService secureLogMonService;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        LOG.info("Aggregate secure log monthly report job start...");
        secureLogMonService.aggregate();
        LOG.info("Aggregate secure log monthly report job done.");
    }

}
